#!/usr/bin/env/ pythonBasics
# -*-coding:utf-8 -*-

# Author:super
import requests

class ApiRequest():
	def request(self,url,method,**kwargs):
		'''封装请求方法'''
		if method=='get':
			return requests.request(url=url,method='get',**kwargs)
		elif method=='post':
			return requests.request(url=url,method='post',**kwargs)
		elif method=='delete':
			return requests.request(url=url,method='delete',**kwargs)
		elif method=='put':
			return requests.request(url=url,method='put',**kwargs)

	def get(self,url,**kwargs):
		'''返回get方法'''
		return self.request(url=url,method='get',**kwargs)

	def post(self,url,**kwargs):
		'''返回post方法'''
		return self.request(url=url,method='post',**kwargs)

	def delete(self,url,**kwargs):
		'''返回delete方法'''
		return self.request(url=url,method='delete',**kwargs)

	def put(self,url,**kwargs):
		'''返回put方法'''
		return self.request(url=url,method='put',**kwargs)